<?php
if ($_POST ["submit"] == "") {
	?>
<div class="mainbody"><!--MainBody-->
<div class="banner_full"
	style="margin: auto !important; text-align: center;">
<div class="banner_full_content">
<h1>Liên hệ</h1>
<img src="images/banner/topbanner-contact.gif"
	style="margin: auto !important; text-align: center;" /></div>
</div>
<div class="main_container"><!--MainContainer-->
<div class="col-main"><!--ColMain-->
<div class="noidungtext">
<h3>Liên hệ</h3>
<b>Địa chỉ</b>: 1105 - Tòa nhà 25T1, Khu N05 đường Hoàng Đạo Thúy, Trung
Hòa Nhân Chính, Cầu Giấy, Hà Nội<br />
<b>Điện thoại</b>: 04.3641.7498 - Fax: 04.3543.0479<br />
<b>Email</b>: info@hmh.com.vn<br />
<b>Website</b>: www.hmh.com.vn<br />

<div id="wrap">

<form action="" method="post">
<ul id="contactform">
	<li><label for="name">Your Name*</label> <span class="fieldbox"><input
		type="text" name="name" id="name" value="" /></span></li>
	<li><label for="email">Email*</label> <span class="fieldbox"><input
		type="text" name="email" id="email" value="" /></span></li>
	<li><label for="name">Chủ đề*</label> <span class="fieldbox"><input
		type="text" name="subject" id="subject" value="" /></span></li>
	<li><label for="name">Mã đặt hàng</label> <span class="fieldbox"><input
		type="text" name="orderid" id="name" orderid=""
		value="Nếu bạn muốn hỏi về đơn hàng..."
		onfocus="if (this.value=='Nếu bạn muốn hỏi về đơn hàng...') this.value='';"
		onblur="if (this.value=='') this.value='Nếu bạn muốn hỏi về đơn hàng...';" /></span>
	</li>
	<li><label for="contact">Phone.*</label> <span class="fieldbox"><input
		type="text" name="phone" id="phone" value="" /></span></li>
	<li><label for="msg">Message</label> <span class="msgbox"><textarea
		class="area" id="msg" name="msg" rows="8" cols="30"></textarea></span>
	</li>
</ul>

<p>required field*</p>
<input type="submit" value="Send" id="sendbutton" name="submit" /></form>
</div>
</div>
</div>
<!--ColMain-->
            <?php
	include "templates/right.php";
	?>
            <!--ColRight--></div>
<!--MainContainer--></div>

<?php
} else {
	include "class/mail_class.php";
	$subject = $_POST ["subject"];
	$content_mail .= "Name: " . $_POST ["name"] . "<br>";
	$content_mail .= "Email: " . $_POST ["email"] . "<br>";
	if ($_POST ["orderid"] != 'Nếu bạn muốn hỏi về đơn hàng...')
		$content_mail .= "Order ID: " . $_POST ["orderid"] . "<br>";
	$content_mail .= "phone: " . $_POST ["phone"] . "<br>";
	$content_mail .= "msg: " . $_POST ["msg"] . "<br>";
	if (new Mail ( 'longld@nsviet.com.vn', 'Example send mail', '<h2>Mail is send!</h2>' )) {
		echo 'Mail is sent -> OK';
	} else {
		echo 'Mail is not sent';
	}
}
?>